package util;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;


/**
 * The Class Stringer that holds all constants.
 * 
 * @author Andy Johnson
 */
public class Stringer {

	/** The str values from the config file. */
	private static ArrayList<String> strValues; 	
	
	/**
	 * Instantiates a new stringer.
	 *
	 * @throws IOException Signals that an I/O exception has occurred.
	 */
	public Stringer() throws IOException
	{
		strValues = new ArrayList<String>();
		
		FileReader fr = new FileReader("config.txt");
		
		BufferedReader br = new BufferedReader(fr);
		
		String s;
		while((s = br.readLine()) != null)
		{
			strValues.add(s);
		}
	}
	
	/**
	 * Gets the string from our config text file.
	 *
	 * @param index the index
	 * @return the string
	 */
	public static String getString(final int index)
	{
		return strValues.get(index);
	}
}
